const express = require('express');
const router = express.Router();
const orderController = require("../controllers/order.server.controller")
router
    .get('/merchant/:mid', orderController.showCurrentOrder)
    .get('/customer', orderController.loadOrder)//1.load等待接�?�，接�?�中的订�?� 2.load历�?�订�?�  3.查询�?�数是0的执行1， 查询�?�数是1的执行2
    .get('/',orderController.historyOrder)//1.历史订单
    .put('/:oid', orderController.operateOrder)// 1.确认接收订单 2.从历史订单中评价
    .put('/merchant/:mid', orderController.checkoutOrComfirmOrder) //1.checkout 订单  2.confirm 订单
    .post('/makeOrderTestData', orderController.makeOrderTestData)
    .get('/refresh/:oid', orderController.refreshOrderDetails);

module.exports = router;